/**
 * 	Revised2011Syllabus.java
 *
 *  This file is part of the PDFGen Syllabus Formatter Project.
 *  Copyright (C) 2012  Gian Fontanilla
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.dlsu.pdfgen.struct;
import java.util.ArrayList;

/**
 * Generates the PDF file from a given <CODE>Syllabus</CODE>.
 * 
 * @author Michelle Ormoc
 * @see Revised2011Formatter
 * 
 */

public class Revised2011Syllabus extends Syllabus {
	private String college;
	private String department;
	private ArrayList<String> learningOutcome;
	private String learningOutcomeDescription;
	private String finalCourseOutputDescription;
	private ArrayList<FinalCourseOutput> finalCourseOutput;
	private String rubricDescription;
	private ArrayList<Rubric> rubric;
	private String otherRequirementsDescription;
	private String gradingSystemDescription;
	private String learningPlanDescription;
	private ArrayList<LearningPlan> learningPlan;
	private ArrayList<String> onlineResources;
	private ArrayList<String> classPolicy;
	private ArrayList<String> otherRequirements;
	private ArrayList<String> gradingSystem;
	private String referenceDescription;
	private String onlineResourcesDescription;
	private String onlineResourceListType;
	private String classPolicyDescription;
	private String classPolicyListType;
	
	public Revised2011Syllabus(){
	this.college = "";
	this.department = "";
	this.learningOutcomeDescription = "";
	this.finalCourseOutputDescription = "";
	this.rubricDescription = "";
	this.otherRequirementsDescription = "";
	this.setClassPolicyDescription("");
	this.onlineResourceListType = "";
	this.onlineResourcesDescription = "";
	this.setClassPolicyListType("");
	this.onlineResources = new ArrayList<String>();
	this.gradingSystem = new ArrayList<String>();
	this.setClassPolicy(new ArrayList<String>());
	this.learningPlanDescription = "";
	this.learningPlan = new ArrayList<LearningPlan>();
	this.rubric = new ArrayList<Rubric>();
	this.learningOutcome = new ArrayList<String>();
	this.otherRequirements = new ArrayList<String>();
	this.finalCourseOutput = new ArrayList<FinalCourseOutput>();		
	}
	/**
	 * @param learningOutcome the learningOutcome to set
	 */
	public void setLearningOutcome(ArrayList<String> learningOutcome) {
		this.learningOutcome = learningOutcome;
	}
	/**
	 * @return the learningOutcome
	 */
	public ArrayList<String> getLearningOutcome() {
		return learningOutcome;
	}
	/**
	 * @param department the department to set
	 */
	public void setDepartment(String department) {
		this.department = department;
	}
	/**
	 * @return the department
	 */
	public String getDepartment() {
		return department;
	}
	/**
	 * @param college the college to set
	 */
	public void setCollege(String college) {
		this.college = college;
	}
	/**
	 * @return the college
	 */
	public String getCollege() {
		return college;
	}
	/**
	 * @param learningOutcomeDescription the learningOutcomeDescription to set
	 */
	public void setLearningOutcomeDescription(
			String learningOutcomeDescription) {
		this.learningOutcomeDescription = learningOutcomeDescription;
	}
	/**
	 * @return the learningOutcomeDescription
	 */
	public String getLearningOutcomeDescription() {
		return learningOutcomeDescription;
	}
	/**
	 * @param finalCourseOutputDescription the finalCourseOutputDescription to set
	 */
	public void setFinalCourseOutputDescription(
			String finalCourseOutputDescription) {
		this.finalCourseOutputDescription = finalCourseOutputDescription;
	}
	/**
	 * @return the finalCourseOutputDescription
	 */
	public String getFinalCourseOutputDescription() {
		return finalCourseOutputDescription;
	}
	/**
	 * @param finalCourseOutput the finalCourseOutput to set
	 */
	public void setFinalCourseOutput(ArrayList<FinalCourseOutput> finalCourseOutput) {
		this.finalCourseOutput = finalCourseOutput;
	}
	/**
	 * @return the finalCourseOutput
	 */
	public ArrayList<FinalCourseOutput> getFinalCourseOutput() {
		return finalCourseOutput;
	}
	/**
	 * @param rubricDescription the rubricDescription to set
	 */
	public void setRubricDescription(String rubricDescription) {
		this.rubricDescription = rubricDescription;
	}
	/**
	 * @return the rubricDescription
	 */
	public String getRubricDescription() {
		return rubricDescription;
	}
	/**
	 * @param rubric the rubric to set
	 */
	public void setRubric(ArrayList<Rubric> rubric) {
		this.rubric = rubric;
	}
	/**
	 * @return the rubric
	 */
	public ArrayList<Rubric> getRubric() {
		return rubric;
	}
	/**
	 * @param learningPlan the learningPlan to set
	 */
	public void setLearningPlan(ArrayList<LearningPlan> learningPlan) {
		this.learningPlan = learningPlan;
	}
	/**
	 * @return the learningPlan
	 */
	public ArrayList<LearningPlan> getLearningPlan() {
		return learningPlan;
	}
	/**
	 * @param otherRequirementsDescription the otherRequirementsDescription to set
	 */
	public void setOtherRequirementsDescription(
			String otherRequirementsDescription) {
		this.otherRequirementsDescription = otherRequirementsDescription;
	}
	/**
	 * @return the otherRequirementsDescription
	 */
	public String getOtherRequirementsDescription() {
		return otherRequirementsDescription;
	}
	/**
	 * @param learningPlanDescription the learningPlanDescription to set
	 */
	public void setLearningPlanDescription(String learningPlanDescription) {
		this.learningPlanDescription = learningPlanDescription;
	}
	/**
	 * @return the learningPlanDescription
	 */
	public String getLearningPlanDescription() {
		return learningPlanDescription;
	}
	/**
	 * Creates and returns an <CODE>FinalCourseOutput</CODE> object.
	 *
	 * @param learning
	 *            The learning outcome
	 * @param output
	 *            The final output
	 * @param date
	 * 			  The due date
	 * @return
	 */
	public FinalCourseOutput createFinalOutput(String learning, String output, String date) {
		return new FinalCourseOutput(learning, output, date);
	}	
	/**
	 * Gets the due date
	 *
	 * @param finalCourse
	 *            The finalCourse
	 * @return The due date
	 */
	public static String getDate(Object finalCourse) {
		if (finalCourse instanceof FinalCourseOutput)
			return ((FinalCourseOutput) finalCourse).date;
		return null;
	}
	/**
	 * Gets the final output
	 *
	 * @param finalCourse
	 *            The finalCourse
	 * @return The final output
	 */
	public static String getOutput(Object finalCourse) {
		if (finalCourse instanceof FinalCourseOutput)
			return ((FinalCourseOutput) finalCourse).output;
		return null;
	}
	/**
	 * Gets the learning outcome
	 *
	 * @param finalCourse
	 *            The finalCourse
	 * @return The learning outcome
	 */
	public static String getLearning(Object finalCourse) {
		if (finalCourse instanceof FinalCourseOutput)
			return ((FinalCourseOutput) finalCourse).learning;
		return null;
	}
	/**
	 * Creates and returns an <CODE>Rubric</CODE> object.
	 *
	 *  *
		 * @param criteria
		 *            criteria
		 * @param exemplary
		 * 			  exemplary
		 * @param satisfactory
		 * 			  satisfactory
		 * @param developing
		 * 			  developing
		 * @param beginning
		 * 			  beginning
		 * @param rating
		 * 			  the rating
	 * @return
	 */
	public Rubric createRubricAssessment(String criteria, String exemplary, String satisfactory, String developing, String beginning, String rating) {
		return new Rubric(criteria, exemplary, satisfactory, developing, beginning, rating);
	}
	/**
	 * Gets the criteria
	 *
	 * @param rubric
	 *            The rubric
	 * @return The criteria
	 */
	public static String getCriteria(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).criteria;
		return null;
	}
	/**
	 * Gets the exemplary
	 *
	 * @param rubric
	 *            The rubric
	 * @return The exemplary
	 */
	public static String getExemplary(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).exemplary;
		return null;
	}
	/**
	 * Gets the satisfactory
	 *
	 * @param rubric
	 *            The rubric
	 * @return The satisfactory
	 */
	public static String getSatisfactory(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).satisfactory;
		return null;
	}
	/**
	 * Gets the developing
	 *
	 * @param rubric
	 *            The rubric
	 * @return The developing
	 */
	public static String getDeveloping(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).developing;
		return null;
	}
	/**
	 * Gets the beginning
	 *
	 * @param rubric
	 *            The rubric
	 * @return The beginning
	 */
	public static String getBeginning(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).beginning;
		return null;
	}
	/**
	 * Gets the rating
	 *
	 * @param rubric
	 *            The rubric
	 * @return The rating
	 */
	public static String getRating(Object rubric) {
		if (rubric instanceof Rubric)
			return ((Rubric) rubric).rating;
		return null;
	}	
	/**
	 * Creates and returns an <CODE>LearningPlan</CODE> object.
	 *
	 *  *
		 * @param learning
		 *            learning outcome
		 * @param topic
		 * 			  topic name
		 * @param week
		 * 			  duration of the topic
		 * @param activities
		 * 			  learning activities for the topic
	 * @return
	 */
	public LearningPlan createLearningPlan(String learning, String topic, String week, String activities) {
		return new LearningPlan(learning, topic, week, activities);
	}
	/**
	 * Gets the learning
	 *
	 * @param learningPlan
	 *            The learning plan
	 * @return The learning
	 */
	public static String getLearningName(Object learningPlan) {
		if (learningPlan instanceof LearningPlan)
			return ((LearningPlan) learningPlan).learning;
		return null;
	}
	/**
	 * Gets the topic
	 *
	 * @param learningPlan
	 *            The learning plan
	 * @return The topic
	 */
	public static String getTopic(Object learningPlan) {
		if (learningPlan instanceof LearningPlan)
			return ((LearningPlan) learningPlan).topic;
		return null;
	}
	/**
	 * Gets the week
	 *
	 * @param learningPlan
	 *            The learning plan
	 * @return The week
	 */
	public static String getWeek(Object learningPlan) {
		if (learningPlan instanceof LearningPlan)
			return ((LearningPlan) learningPlan).week;
		return null;
	}
	/**
	 * Gets the activities
	 *
	 * @param learningPlan
	 *            The learning plan
	 * @return The activities
	 */
	public static String getActivities(Object learningPlan) {

		if (learningPlan instanceof LearningPlan)
			return ((LearningPlan) learningPlan).activities;
		return null;
	}
	/**
	 * @param otherRequirements the otherRequirements to set
	 */
	public void setOtherRequirements(ArrayList<String> otherRequirements) {
		this.otherRequirements = otherRequirements;
	}
	/**
	 * @return the otherRequirements
	 */
	public ArrayList<String> getOtherRequirements() {
		return otherRequirements;
	}
	/**
	 * @return the gradingSystemDescription
	 */
	public void setGradingSystemDescription(String gradingSystemDescription) {
		this.gradingSystemDescription = gradingSystemDescription;
	}
	/**
	 * @param gradingSystemDescription the gradingSystemDescription to set
	 */
	public String getGradingSystemDescription() {
		return gradingSystemDescription;
	}
	/**
	 * @param gradingSystem the gradingSystem to set
	 */
	public void setGradingSystem(ArrayList<String> gradingSystem) {
		this.gradingSystem = gradingSystem;
	}	
	/**
	 * @return the gradingSystem
	 */
	public ArrayList<String> getGradingSystem() {
		return gradingSystem;
	}
	/**
	 * @param referenceDescription the referenceDescription to set
	 */
	public void setReferenceDescription(String referenceDescription) {
		this.referenceDescription = referenceDescription;
	}
	/**
	 * @return the referenceDescription
	 */
	public String getReferenceDescription() {
		return referenceDescription;
	}
	/**
	 * @param onlineResources the onlineResources to set
	 */
	public void setOnlineResources(ArrayList<String> onlineResources) {
		this.onlineResources = onlineResources;
	}
	/**
	 * @return the onlineResources
	 */
	public ArrayList<String> getOnlineResources() {
		return onlineResources;
	}
	/**
	 * @param onlineResourcesDescription the onlineResourcesDescription to set
	 */
	public void setOnlineResourcesDescription(String onlineResourcesDescription) {
		this.onlineResourcesDescription = onlineResourcesDescription;
	}
	/**
	 * @return the onlineResourcesDescription
	 */
	public String getOnlineResourcesDescription() {
		return onlineResourcesDescription;
	}
	/**
	 * @param onlineResourceListType the onlineResourceListType to set
	 */
	public void setOnlineResourceListType(String onlineResourceListType) {
		this.onlineResourceListType = onlineResourceListType;
	}
	/**
	 * @return the onlineResourceListType
	 */
	public String getOnlineResourceListType() {
		return onlineResourceListType;
	}
	/**
	 * @param classPolicy the classPolicy to set
	 */
	public void setClassPolicy(ArrayList<String> classPolicy) {
		this.classPolicy = classPolicy;
	}
	/**
	 * @return the classPolicy
	 */
	public ArrayList<String> getClassPolicy() {
		return classPolicy;
	}
	/**
	 * @param classPolicyDescription the classPolicyDescription to set
	 */
	public void setClassPolicyDescription(String classPolicyDescription) {
		this.classPolicyDescription = classPolicyDescription;
	}
	/**
	 * @return the classPolicyDescription
	 */
	public String getClassPolicyDescription() {
		return classPolicyDescription;
	}
	/**
	 * @param classPolicyListType the classPolicyListType to set
	 */
	public void setClassPolicyListType(String classPolicyListType) {
		this.classPolicyListType = classPolicyListType;
	}
	/**
	 * @return the classPolicyListType
	 */
	public String getClassPolicyListType() {
		return classPolicyListType;
	}
	private class FinalCourseOutput {
		/** */
		private String learning;

		/** */
		private String output;

		/** */
		private String date;

		/**
		 * Constructor accepting learning, output and due date.
		 *
		 * @param learning
		 *            The learning outcome
		 * @param output
		 *            The expected output
		 * @param date
		 *            The due date of the expected output
		 */
	private FinalCourseOutput(String learning, String output, String date) {

			this.learning = learning;
			this.output = output;
			this.date = date;
		}
	}
	
	private class Rubric {
		/** */
		private String criteria;

		/** */
		private String exemplary;

		/** */
		private String satisfactory;
		
		/** */
		private String developing;

		/** */
		private String beginning;

		/** */
		private String rating;
		/**
		 * Constructor accepting criteria, exemplary, satisfactory, developing, beginning, rating.
		 *
		 * @param criteria
		 *            criteria column
		 * @param exemplary
		 * 			  exemplary column
		 * @param satisfactory
		 * 			  satisfactory column
		 * @param developing
		 * 			  developing column
		 * @param beginning
		 * 			  beginning column
		 * @param rating
		 * 			  rating column
		 *            
		 */
		private Rubric(String criteria, String exemplary, String satisfactory, String developing, String beginning, String rating) {
			this.beginning = beginning;
			this.criteria = criteria;
			this.developing = developing;
			this.exemplary = exemplary;
			this.rating = rating;
			this.satisfactory = satisfactory;
		}
	}
	
	private class LearningPlan {

		/** */
		private String learning;

		/** */
		private String topic;

		/** */
		private String week;
		
		/** */
		private String activities;

		/**
		 * Constructor accepting learning, topic, week, activities
		 *
		 * @param learning
		 *            The learning outcome
		 * @param topic
		 * 			  The topic name           
		 * @param week
		 *            When the topic will be discussed
		 * @param activities
		 *            Leaning activities
		 */
		private LearningPlan(String learning, String topic, String week, String activities) {
			this.learning = learning;
			this.topic = topic;
			this.week = week;
			this.activities = activities;
		}
	}


}
